<?php

class RedirectorController extends ApplicationController {
	function init($params = null){
		if(isset($params[0])){
			$this->redirect($params[0]);
			return true;
		}
		
		return $this;
	}
	
	function redirect($where){
		$URL = Core::$FMSConfig->getValue("environment", "url");
		
		$where = ($where == null) ? $URL : $where;
		
		header("Location: ".$where); 
		exit();		
	}
}

?>